// Created: 09/01/2025, ChangJiang Ru
public class OuterClass {

    public Comparable getInstance()
    {
        // Case 1:
        // Providing a class to implement Comparable interface
        /*
        class MyComparable implements Comparable
        {
            @Override
            public int compareTo(Object o)
            {
                return 0;
            }
        }
        return new MyComparable();
         */

        // Case 2:
        /*
        Comparable c = new Comparable()
        {
            @Override
            public int compareTo(Object o) {
                return 0;
            }
        };
        return c;
         */

        // Case 3:
        /*
        class MyComparable implements Comparable
        {

            @Override
            public int compareTo(Object o) {
                return 0;
            }
        }
        MyComparable m = new MyComparable();
        return m;
         */

        // Case 4:
        return new Comparable() {
            @Override
            public int compareTo(Object o) {
                return 0;
            }
        };

    }





}
